<template>
    <div>
        <el-tabs type="border-card" :stretch="true">
            <el-tab-pane label="查勘照片">
                <el-tree :data="lossPertainData" default-expand-all :props="defaultProps"
                    @node-click="handleNodeClick"></el-tree>
                <el-tree :data="cardPertainData" default-expand-all :props="defaultProps"
                    @node-click="handleNodeClick"></el-tree>
            </el-tab-pane>
            <el-tab-pane label="定损照片">
                <el-tree :data="lossPertainData" default-expand-all :props="defaultProps"
                    @node-click="handleNodeClick"></el-tree>
            </el-tab-pane>
            <el-tab-pane label="单证照片">
                <el-tree :data="cardPertainData" default-expand-all :props="defaultProps"
                    @node-click="handleNodeClick"></el-tree>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
import SortTypeData from "./SortTypeData";
export default {
    data() {
        return {
            sortTypeData: Object.entries(SortTypeData),
            cardPertainData: [SortTypeData[1]],
            lossPertainData: [SortTypeData[0]],
            defaultProps: {
                children: 'children',
                label: 'value'
            }
        }
    },
    computed: {
    },
    methods: {
        handleNodeClick(data) {
            this.$emit('sort-click', data);
        }
    },
}
</script>
<style lang='scss' scoped></style>
